<!--
 * @Author: yeminglong
 * @Date: 2023-09-20 15:49:12
 * @LastEditTime: 2023-10-23 14:24:33
 * @LastEditors: yeminglong
 * @Description: 
-->
<template>
  <h1>测试</h1>
  <div ref="aPlayerContainer"></div>
</template>
<script setup>
import "aplayer/dist/APlayer.min.css";
import APlayer from "aplayer";
const aPlayerContainer = ref();
onMounted(() => {
  //  debugger

  const ap = new APlayer({
    container: aPlayerContainer.value,
    mini: false,
    autoplay: false,
    theme: "#FADFA3",
    loop: "all",
    order: "random",
    preload: "auto",
    volume: 0.7,
    mutex: true,
    listFolded: false,
    listMaxHeight: 90,
    lrcType: 3,
    audio: [
      {
        name: "name1",
        artist: "artist1",
        url: "https://s1.aigei.com/src/aud/mp3/19/194d6c8c5c824659842e8dee5e5d72b8.mp3?e=1697806680&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:1rdh8YrushP9L_PjcRCf-fqvkkg=",
        cover: new URL(`./assets/mp3.png`, import.meta.url).href,
        lrc: "lrc1.lrc",
        theme: "#ebd0c2",
      },
      // {
      //   name: "name2",
      //   artist: "artist2",
      //   url: "url2.mp3",
      //   cover: "cover2.jpg",
      //   lrc: "lrc2.lrc",
      //   theme: "#46718b",
      // },
    ],
  });
});
</script>

